<?php

/**
 * This is the model metadata class for table "goods_travel".
 */
class GoodsTravelMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'goods_travel';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('uid, goods_id, company_id, type, num, day_number, travel_province, travel_city, travel_district, departure_province, departure_city, departure_district, total_num', 'numerical', 'integerOnly'=>true),
			array('traffic', 'length', 'max'=>10),
			array('service', 'length', 'max'=>520),
			array('departure_address', 'length', 'max'=>255),
			array('emergency_tel', 'length', 'max'=>13),
			array('send_group', 'length', 'max'=>500),
			array('start_time, end_time, desc, departure_time, return_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, uid, goods_id, company_id, type, num, traffic, day_number, start_time, end_time, travel_province, travel_city, travel_district, departure_province, departure_city, departure_district, service, desc, departure_time, return_time, total_num, departure_address, emergency_tel, send_group', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'uid' => '用户',
			'goods_id' => '商品id',
			'company_id' => '旅行社',
			'type' => '旅游路线类型',
			'num' => '出行人数',
			'traffic' => '交通',
			'day_number' => '出行天数',
			'start_time' => '报名开始时间',
			'end_time' => '报名截止时间',
			'travel_province' => '旅游城市',
			'travel_city' => '旅游城市',
			'travel_district' => 'Travel District',
			'departure_province' => '出发城市',
			'departure_city' => 'Departure City',
			'departure_district' => 'Departure District',
			'service' => '服务标准',
			'desc' => '行程描述',
			'departure_time' => 'Departure Time',
			'return_time' => 'Return Time',
			'total_num' => 'Total Num',
			'departure_address' => '详细集合地址',
			'emergency_tel' => '紧急联系电话',
			'send_group' => '发团描述',
		);
	}
}